{{template "header" .}}
<title>登录——我的11go_http</title>
</head>
<body>
<div class="container"  style="width: 500px">
    <form  method="post" action="/login">
        <div class="form-group">
            <label >用户名</label>
            <input  id="uname" class="form-control" placeholder="输入您的用户名" name="uname">
        </div>
        <div class="form-group">
            <label >Password</label>
            <input id="pwd" type="password" class="form-control"  placeholder="Password" name="pwd">
        </div>

        <div class="checkbox">
            <label>
                <input type="checkbox" name="autologin"> 自动登录
            </label>
        </div>
        <button type="submit" class="btn btn-default" onclick="return checkInput();">登录</button>
        <button class="btn btn-default" onclick="return backHome();">返回</button>
    </form>
    <script type ="text/javascript">
        function checkInput() {
            var uname = document.getElementById("uname");
            if (uname.value.length ==0){
                alert("请输入帐号")
                return false
            }

            var pwd = document.getElementById("pwd");
            if(pwd.value.length ==0){
                alert("请输入棉麻")
                return false
            }
            return true

        }

        function backHome() {
                 window.location.href="/"
            return false
        }
    </script>
</div>
</body>
</html>